import React, {Fragment} from 'react';
import Line from "./index";
import VerticalLine from "@/pages/WorkFlowDesigner/Line/VerticalLine";

interface YLineProps {
    uh: number // 上竖线高度
    uw: number // 横线高度
    ih?: number // 下竖线高度
}

export default React.memo((props: YLineProps) => {
    const {uh, uw, ih} = props;
    let nih = ih;
    if (!nih) {
        nih = uh
    }

    return (
        <Fragment>
            <div className="main-flex-container">
                {/*U型实线*/}
                <div className="item-flex-container">
                    <Line hWidth={uw} vHeight={uh} border={2} ULine={true}/>
                </div>
                {/*竖线*/}
                <div className="item-flex-container">
                    <VerticalLine border={2} height={nih}/>
                </div>
            </div>

        </Fragment>
    )
})
